import math
class Shape:
    def __init__(self):
        pass
    def length(self):
        pass
class Triangle(Shape):
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c
    def length(self):
        if self.a > 0 and self.b > 0 and self.c > 0 \
            and self.c + self.b > self.a \
            and self.b + self.a > self.c \
            and self.a + self.c > self.b:
            return self.a + self.b + self.c
        else:
            return 0
class Rectangle(Shape):
    def __init__(self,x,y):
        self.x = x
        self.y = y
    def length(self):
        return 2 * self.x + 2* self.y
class Circle(Shape):
    def __init__(self,r):
        self.r = r
    def length(self):
        return math.pi * 2 * self.r
data = input().split()
for i in range(len(data)):
    data[i] = int(data[i])
if len(data) == 1:
    c = Circle(data[0]).length()
    print(f"圆形的周长为：{c:.2f}")
elif len(data) == 2:
    c = Rectangle(data[0],data[1]).length()
    print(f"矩形的周长为：{c:.2f}")
elif len(data) == 3:
    c = Triangle(data[0],data[1],data[2]).length()
    print(f"三角形的周长为：{c:.2f}")